
var noticeDetailModel = new Backbone.Model();
var NoticeListCollection = Backbone.Collection.extend({
    fetch:function(selfCp , cp){
        $.ajax({
            type:'POST',
            dataType:'json',
            data:{
                selfCp :selfCp,  //当前页
                cp :cp  //要去第几页
            },
            url:'json/noticeList.json',
            success:function(res){
                var list = res.list;
                noticelistLength = list.length;
                $('#NoticeWrapper').height(46*list.length);
                for(var l in list){
                    noticeListCollection.add(new Backbone.Model().set(list[l]));
                }
                noticeListView.loadScroll();
            }
        });
    },
    detailFetch:function(vid){
        $.ajax({
            type:'POST',
            dataType:'json',
            data:{
                id : vid
            },
            url:'json/noticeDetail.json',
            success:function(res){
                noticeDetailModel.set(res);
            }
        });
    }
});
var noticeListCollection = new NoticeListCollection;